import request from '@/utils/request'

// 查询dishcategory列表
export function listDishcategory(query) {
  return request({
    url: '/dishcategory/list',
    method: 'get',
    params: query
  })
}

// 分页查询dishcategory列表
export function listDishcategoryByPage(query) {
  return request({
    url: '/dishcategory/page',
    method: 'get',
    params: query
  })
}

// 查询dishcategory
export function getDishcategory(id) {
  return request({
    url: '/dishcategory/' + id,
    method: 'get'
  })
}

// 新增dishcategory
export function addDishcategory(data) {
  return request({
    url: '/dishcategory',
    method: 'post',
    data: data
  })
}

// 修改dishcategory
export function updateDishcategory(data) {
  return request({
    url: '/dishcategory',
    method: 'put',
    data: data
  })
}

// 删除dishcategory
export function deleteDishcategory(id) {
  return request({
    url: '/dishcategory/delete/' + id,
    method: 'delete'
  })
}
